/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bs.Controllers;

import com.bs.Beans.Colaborador;
import com.bs.Forms.ColaboradorForm;
import com.bs.extensoesSwing.AbstractGridController;
import com.bs.extensoesSwing.PadraoForm;

/**
 *
 * @author Bone
 */
public class ColaboradorController <E> extends AbstractGridController<Colaborador>{

    @Override
    public void novo() {
        Colaborador c = new Colaborador();
        ColaboradorForm f = new ColaboradorForm(getEntityManager(), c);
        f.setVisible(true);
        if(!f.isCancelado()){
            adicionarALista((Colaborador)f.getBean());
        }
    }

    @Override
    public void alterar() {
        ColaboradorForm f = new ColaboradorForm(getEntityManager(), getBeanSelecionado(), PadraoForm.ALTERAR);
        f.setVisible(true);
    }
    
}
